-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Electra upgrade #1283
base: main
Are you sure you want to change the base?
Electra upgrade #1283
Conversation
@@ -55,49 +53,3 @@ func DenebExecutionPayloadToScale(e *state.ExecutionPayloadDeneb) (scale.Executi | |||
}, nil | |||
} | |||
|
|||
func DenebJsonExecutionPayloadHeaderToScale(e *beaconjson.FullExecutionPayloadHeaderJson) (scale.ExecutionPayloadHeaderDeneb, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused method.
# Conflicts: # relayer/contracts/gateway.go # relayer/relays/beacon/header/syncer/syncer_test.go # relayer/relays/beacon/store/datastore_test.go
--rest.namespace="*" \ | ||
--jwt-secret $config_dir/jwtsecret \ | ||
--chain.archiveStateEpochFrequency 1 \ | ||
>"$output_dir/lodestar.log" 2>&1 & |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should it be output_electra_dir
?
if [ "$is_electra" == "true" ]; then | ||
HOST=$(ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may not work for machines with multi-network interfaces, my PC, e.g.
➜ test git:(electra) ✗ ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1'
192.168.0.127
26.26.26.1
192.168.64.1
docker run --rm \ | ||
-v "${output_electra_dir}:/mnt" \ | ||
docker.io/ethpandaops/geth:lightclient-prague-devnet-4 \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest not introducing docker for the local setup, can maybe build from source if necessary like lodestar.
retries := 5 | ||
bootstrap, err := s.getCheckpoint() | ||
if err != nil { | ||
return scale.BeaconCheckpoint{}, fmt.Errorf("get finalized checkpoint: %w", err) | ||
for retries > 0 { | ||
retries = retries - 1 | ||
bootstrap, err = s.getCheckpoint() | ||
if err != nil { | ||
log.WithError(err).Info("retry bootstrap, sleeping") | ||
time.Sleep(10 * time.Second) | ||
continue | ||
} | ||
break |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious is the retry necessary here?
if isDeneb { | ||
if forkVersion == protocol.Electra { | ||
beaconState = &state.BeaconStateElectra{} | ||
} else if forkVersion == protocol.Deneb { | ||
beaconState = &state.BeaconStateDenebMainnet{} | ||
} else { | ||
beaconState = &state.BeaconStateCapellaMainnet{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Capella branch can be deleted?
err = signedBlock.UnmarshalSSZ(blockBytes) | ||
if err != nil { | ||
return scale.HeaderUpdatePayload{}, fmt.Errorf("fetch block: %w", err) | ||
return scale.HeaderUpdatePayload{}, fmt.Errorf("unmarshal block ssz: %w", err) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool! Much cleaner now.
} else { | ||
executionPayloadScale, err := api.CapellaExecutionPayloadToScale(sszBlock.ExecutionPayloadCapella()) | ||
executionPayloadScale, err := api.CapellaExecutionPayloadToScale(beaconBlock.ExecutionPayloadCapella()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can just remove the Capella branch?
Changes
Testing
Resolves SNO-1140.
Companion: Snowfork/polkadot-sdk#178
Note: I used a docker image for the relevant Geth dependency, since the source code used for Electra release does not build.